package rozetka.pageObjects;

import java.util.concurrent.TimeUnit;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;

public class SearchResultView {
	WebDriver driver;
	private static final By urlOfProduct = By.xpath("//*[@id='head_banner_container']/div[3]/div/div[1]/div/div/div[3]/div[1]/div[2]/div[1]/a");

	public SearchResultView(WebDriver driver) {
		
		this.driver = driver;
	}

	public WebElement getTextOfURl() {
		return driver.findElement(urlOfProduct);

	}
	
	public void clickOnUrl(){         
		driver.findElement(urlOfProduct).click();
		driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
	}

}
